
#include "cardtest4.h"
//cardEffect(int card, int choice1, int choice2, int choice3, struct gameState *state, int handPos, int *bonus)

void testOutpost(struct gameState* state){
    int result;
    int failed_tests =0;
    int bonus = 0;
    int player = whoseTurn(state);
    int preOutpostPlayed = state->outpostPlayed;
    int preHandCount = state->handCount[player];
    
    result = cardEffect(outpost,0,0,0,state,0,&bonus);
    if(result !=0){
        printf("Failed to return successfully on Outpost for player %i\n",player);
        failed_tests+=1;
    }
    if(preHandCount-1 !=state->handCount[player]){
        printf("Failed to successfully discard card on Outpost for player %i. \n",player);
        failed_tests+=1;
    }
    if(preOutpostPlayed+1 != state->outpostPlayed){
        printf("Failed to increment numbers of outposts played for player %i. \n",player);
        failed_tests+=1;
    }
    
    if(failed_tests ==0){
        printf("All tests passed for Outpost card.\n");
    }
    else{
        printf("Number of tests failed for outpost card: %i. \n",player);
        
    }
}
int main(int argc, char** argv){
    int cards[10] = {adventurer, council_room, feast, gardens, mine,
        remodel, smithy, village, baron, great_hall};
    
    struct gameState* game =newGame();
    int initialized = initializeGame(2,cards,42,game);
    if(initialized!=-1){
        testOutpost(game);
    }
    return 0;
    
}